<?php
/**
 * Radcodes - SocialEngine Module
 *
 * @category   Application_Extensions
 * @package    Story
 * @copyright  Copyright (c) 2009-2010 Radcodes LLC (http://www.radcodes.com)
 * @license    http://www.radcodes.com/license/
 * @version    $Id$
 * @author     Vincent Van <vincent@radcodes.com>
 */
?>
<div class='story_profile_related_stories'>
  <?php if( $this->paginator->getTotalItemCount() > 0 ): ?>
      <ul class='stories_list'>
        <?php foreach ($this->paginator as $story): ?>
          <li>
            <?php if ($this->showphoto && $story->photo_id): ?>
              <div class="story_photo">
                <?php echo $this->htmlLink($story->getHref(), $this->itemPhoto($story, 'thumb.icon'));?>
              </div>
            <?php endif;?>            
            <div class="story_content">
              <div class="story_title">
                <?php $title = $this->radcodes()->text()->truncate($story->getTitle(), 36); ?>
                <?php echo $this->htmlLink($story->getHref(), $title); ?>
              </div>
              <div class="story_details">
                <?php echo $this->translate('by %s', $story->getOwner()->toString()); ?>
              </div>
            </div>
          </li>
        <?php endforeach; ?>  
      </ul>
  <?php else: ?>
    <div class="tip">
      <span>
        <?php echo $this->translate('There are no tagging related stories for this story.');?>
      </span>
    </div>
  <?php endif; ?>    
</div>